﻿using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata.Builders;
using Volo.Abp.EntityFrameworkCore.Modeling;

namespace HuaskyErp.MaterialTypes;

public class MaterialTypeEntityTypeConfiguration: IEntityTypeConfiguration<MaterialType>
{
    public void Configure(EntityTypeBuilder<MaterialType> builder)
    {
        builder.ToTable(HuaskyErpConsts.DbTablePrefix + nameof(MaterialType));
        builder.Property(a => a.Name).HasMaxLength(200);
        builder.Property(a => a.Description).HasMaxLength(500);
        builder.ConfigureByConvention();
    }
}